<?php
if(!isset($_SESSION['user'])){
redirect(LOGIN);
}
$model = new Model();

$model->select = "id, name";
$model->order = "name ASC";
$model->where = "username = '" . $_SESSION['user']['username'] . "'";
$model->getdata('album');
$data['albums'] = $model->fetchAll();

$model->select = "id, name";
$model->where = "";
$model->order = "name ASC";
$model->getdata('category');
$data['categories'] = $model->fetchAll();



loadview('template/header',$data);
loadview('user/post_text',$data);

?>
